import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/Index'
import Classify from '@/components/Classify'
import My from '@/components/My'
import Find from '@/components/Find'
import Course from '@/components/Course'
import Search from '@/components/Search'
import ClassifyCourse from '@/components/ClassifyCourse'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/course/:id/:title',
      name: 'Course',
      component: Course
    },
    {
      path: '/classify',
      name: 'Classify',
      component: Classify
    },
    {
      path: '/my',
      name: 'My',
      component: My
    },
    {
      path: '/find',
      name: 'Find',
      component: Find
    },
    {
      path: '/search',
      name: 'Search',
      component: Search
    },
    {
      path: '/classify/:yxid/:xsm',
      name: 'ClassifyCourse',
      component: ClassifyCourse
    }
  ]
})
